import TopHeader from '../views/TopHeader.tsx'
import {Outlet, useNavigation} from "react-router-dom";
// import {getContacts} from "../contacts.ts";
// import {useLocation} from "react-router-dom";
// import {getToken} from "../utils/cookie-utils.ts";
export default function () {
    // const location = useLocation();
    // const token = getToken();
    const nav = useNavigation();
    // 判断是否登录
    // const
    return <>
        <TopHeader/>
        <div className={nav.state === "loading" ? 'main-view loading' : 'main-view'}>
            <Outlet/>
        </div>
    </>
}